package com.hqyj.controller;

import com.hqyj.pojo.GoodsModel;
import com.hqyj.service.GoodsModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @ClassName GoodsModel
 * @Description TODO
 * @Author ZhuYouWan
 * @Date 2022/8/30 18:24
 * @Version 1.0
 **/
@Controller
@RequestMapping("/gm")
public class GoodsModelController {
    @Autowired
    private GoodsModelService goodsModelService;
    @RequestMapping("/findGoodsModelAll")
    @ResponseBody
    public Map<String, Object> findGoodsModelAll(int pageNum, int pageSize, String condition){
        return goodsModelService.findGoodsModelAll(pageNum, pageSize, condition);
    }
    @RequestMapping("/deleteGoodsModelById")
    @ResponseBody
    public Map<String, Object> deleteGoodsModelById(int mId){
        return goodsModelService.deleteGoodsModelById(mId);
    }
    @RequestMapping("/insertGoodsModel")
    @ResponseBody
    public Map<String, Object> insertGoodsModel(GoodsModel goodsModel){
        return goodsModelService.insertGoodsModel(goodsModel);
    }
    @RequestMapping("/findGoodsModelById")
    @ResponseBody
    public Map<String, Object> findGoodsModelById(int mId){
        return goodsModelService.findGoodsModelById(mId);
    }
    @RequestMapping("/findGoodsModelBymType")
    @ResponseBody
    public Map<String, Object> findGoodsModelBymType(String mType){
        return goodsModelService.findGoodsModelBymType(mType);
    }
    @RequestMapping("/updateGoodsModelById")
    @ResponseBody
    public Map<String, Object> updateGoodsModelById(GoodsModel goodsModel){
        return goodsModelService.updateGoodsModelById(goodsModel);
    }
}
